<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>

<head>
	<meta charset="UTF-8">
	<title>资讯详情页</title>
	<meta name="page-view-size" content="1280*720">
	<link rel="stylesheet" href="../css/base.css">
	<!-- <link rel="stylesheet" href="../css/detailPage.css"> -->
	<script type="text/javascript" src="../lib/js/evm.js"></script>
	<script type="text/javascript" src="../lib/js/Evm_djyw.js"></script>
	<script type="text/javascript" src="../lib/js/key.js"></script>
	<script src="../lib/js/jquery-1.11.1.min.js" type="text/javascript" charset="utf-8"></script>
	<script src="../lib/js/jquery.cookie.js" type="text/javascript" charset="utf-8"></script>
	<script src="../js/api.js" type="text/javascript" charset="utf-8"></script>
	<script src="../js/public.js" type="text/javascript" charset="utf-8"></script>
	<script src="../lib/js/md5.js" type="text/javascript" charset="utf-8"></script>
	<style>
		.articleDetail-bg {
			width: 1280px;
			height: 720px;
			background: url(../images/bg.png) no-repeat left top;

		}

		.model {
			box-sizing: border-box;
			border: 3px solid transparent;
		}

		#articleDetailBody {
			position: absolute;
			top: 150px;
			left: 80px;
			width: 1121px;
			height: 481px;
			background: rgba(0, 0, 0, .2);
			border-radius: 15px;
			color: white !important;
		}

		#modelImg {
			top: 85px;
			left: 40px;
			width: 240px;
			height: 210px;
			border: 3px solid rgba(255, 255, 255, 0.2);
			position: relative;
			float: left;
		}



		#modelImg>img {
			height: 100%;
			width: 100%;
		}

		.active,
		#modelImg.active {
			border: solid 3px lightgreen;
		}

		#detailContain {
			color: 333;
			line-height: 35px;
			font-size: 20px;
			position: absolute;
			top: 80px;
			left: 300px;
			width: 770px;
			height: 350px;
			overflow: hidden;
			border-radius: 10px;
			text-indent: 1rem;
		}

		.title {
			width: 100%;
			font-size: 32px;
			line-height: 50px;
			top: 5px;
			position: absolute;
			/* left: 287px; */
			/* border: 1px solid red; */
			text-align: center
		}

		.detailRow {
			width: 100%;
			overflow: hidden;
		}

		.detailRow>span:first-child {
			font-size: 24px;
			width: 120px;
			font-weight: bold;
			color: #Fdd000;
			line-height: 36px;
			/* letter-spacing: 1px; */
		}

		.conItems {
			/* float: right; */
			width: 554px;
			font-size: 28px;
    		color: white;
		}

		.w2 {
			letter-spacing: 1.5rem;
			margin-right: -1.5rem;
		}

		.w3 {
			letter-spacing: .5rem;
			margin-right: -.5rem;
		}

		#modelCur {
			position: absolute;
			text-align: center;
			line-height: 50px;
			color: #fff;
			width: 240px;
			height: 54px;
			background: rgba(0,0,0,.3);
			border-radius: 10px;
			font-size: 28px;
			top: 310px;
			left: 40px;
		}

		.detailRow {
			margin-bottom: 10px;
		}

		.model:last-child.active {
			border: 3px solid #a77d00;
		}

		.ell {
			font-size: 28px;
			color: white;
		}

		.left {
			float: left;
		}

		span.list-address {
			font-size: 28px;
			color: #666666;
		}
	</style>
</head>

<body>
	<div class="articleDetail-bg" id="articleDetailMain">

		<div id="articleDetailBody">
			<div class="title">
			</div>
			<div class="model" id="modelImg">
				<img class="imgs" src="" alt="">
			</div>
			<div class="model" id="detailContain">
				<div class="container" id="detail">
					<div class="content" id="content">
					</div>
				</div>
			</div>
			<div class="model" id="modelCur">
				微信扫码加入团队
				<!-- <span id="numberCur"></span> -->
			</div>
		</div>

	</div>
</body>
<script>
	isCache = false;
	var modelIndex = {
		disUser: true,
		index: 1, //初始位置
		listName: 'model', //模块名称
		containerId: 'articleDetailBody', //包含模块的标签id
		thisContain: 'detailContain', //翻滚外容器
		thisDetail: 'detail', //翻滚内容
	}


	TV.structure('志愿者招募')

	var articleRun;
	var photos;

	function direOpt(index, directive) {
		if (directive == "up") { //上
			if (index == 1) { //文章翻滚
				TV.articleMove(directive, modelIndex.thisContain, modelIndex.thisDetail);
			}
		} else if (directive == "down") { //下
			if (index == 1) { //文章翻滚
				TV.articleMove(directive, modelIndex.thisContain, modelIndex.thisDetail);
			}
		}
		//  else {

		// 	index = index == 2 ? 1 : 2;
		// 	clearInterval(articleRun);
		// }
		return index;
	}

	function getMessage() {
		var param = {
			id: TV.GetParam('id'),
			// area_id: $.cookie('TV_CST_AREA')
		}
		GetDatas('volunteerGroup', param, function (err, res) {

			var mess = res.data;
			// photos = mess.photos
			console.log(mess)
			var str = ''
			str += ' <p class="detailRow">'
			str += '<span class="">团队名称：</span>'
			str += '<span class="ell"> ' + mess.title + '</span>'
			str += '</p>'
			str += ' <p class="detailRow">'
			str += '<span class="w3">联系人：</span>'
			str += '<span class="ell">' + mess.contacter + '</span>'
			str += '</p>'
			str += ' <p class="detailRow">'
			str += '<span >联系方式：</span>'
			str += '<span class="ell">' + mess.mobile + '</span>'
			str += '</p>'
			str += ' <p class="detailRow">'
			str += '<span>团队人数：</span>'
			str += '<span class="ell">' + mess.num +  '&nbsp;人</span>'
			str += '</p>'
			str += ' <p class="detailRow">'
			str += '<span class="left">地&nbsp;&nbsp;&nbsp;&nbsp;址：</span>'
			str += '<span class="ell">' + mess.address + '</span>'
			str += '</p>'
			str += ' <p class="detailRow">'
			str += '<span>团队简介：</span>'
			str += '<span class="conItems">' + mess.content + '</span>'
			str += '</p>'
			$('.content').html(str);
			$('.title').html(mess.title)
			//if (mess.logo) {
				
				
			//} else {
				// $('.imgs').attr('src', '../images/base1.jpg');
			//}

		})
	}
	getMessage();
	// var random = parseInt(Math.random() * 10000);
	// var scankey = hex_md5(navigator.userAgent + random);
	// var surl = API_URL.loginURL + "home/index/qrcode?url="+encodeURIComponent("http://sywx.cst-info.cn:18080/#/applyvolunteer?group_id="+ TV.GetParam('id')+"&scankey=" + scankey) ;
	$('.imgs').attr('src', API_URL['erweima']+"home/index/qrcode?url="+encodeURIComponent( API_URL.WXUrlzhaomu + TV.GetParam('id')));
	// $('.imgs').attr('src',surl);
    //扫码轮询
	// window.setInterval(function () {
	// 	var access_token = $.cookie('TV_CST_TOKEN');
	// 	var params = {
	// 		scankey: scankey,
    //         access_token:access_token,
	// 		group_id: TV.GetParam('id')
			
	// 	}
	// 	// console.log(params);
	// 	http(API_URL.loginURL + 'api/v2/volunteer/poll', params, function (err, data) {
	// 		console.log(data);
	// 		if (data.code == 10002) {
	// 			TV.PromptMsg("请先登录")
    //                     setTimeout(function () {
    //                         window.location.href = 'login.html'
    //             }, 1000);
	// 		}else if(data.code == 0){
	// 			// TV.PromptMsg("可以下一步了")
				// $("#modelCur").html("已加入团队")
	// 		}else if(data.code == 10009){
	// 			// TV.userLogin();
	// 			// TV.PromptMsg("cooki过期了")
	// 		}

	// 	})
	// },2000)


	function direEnter(index) {
		console.log()
		if (index == 1) {
			clearInterval(articleRun);
		} else {
			// TV.PromptMsg('报名成功')
		}
	}
</script>
<script type="text/javascript" src="../js/index.js"></script>

</html>